Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-421

ArrayBuilder: array type should reflect common class of its entries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3
    • 3.4.0
    • None

    Description

      WHAT:

      The ArrayBuilder (used on syntax like [1,3,5]) tries hard to unbox if possible (Integer to int) or keep Number as common class but falls short of strong typing for other classes.

      It would be convenient to type arrays using the strongest (in sense of abstraction) common class from the entries.

      HOW:

      When detecting entry class mismatch (and not a unboxing or Number), find better common class; Object class should only be last resort.

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: